package main

import (
	"fmt"
	"github.com/cloudwego/kitex/server"
	"log"
	passenger "monthly/kitex_gen/monthly/passenger/passengerservice"
	"monthly/rpc/basic/global"
	_ "monthly/rpc/basic/inits"
	"net"
)

func main() {
	PassengerConf := &global.AppConf.PassengerService
	addr, _ := net.ResolveTCPAddr("tcp", fmt.Sprintf("%v:%v", PassengerConf.Host, PassengerConf.Port))

	svr := passenger.NewServer(new(PassengerServiceImpl), server.WithServiceAddr(addr))

	err := svr.Run()

	if err != nil {
		log.Println(err.Error())
	}
}
